#!/bin/sh

source ../public.sh

export PREBUILT=$ANDROID_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86
export PLATFORM=$ANDROID_HOME/platforms/android-8/arch-arm
export ARM_INC=$PLATFORM/usr/include
export ARM_LIB=$PLATFORM/usr/lib
export ARM_LIB2=$PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3
export ARM_CFLAGS="-I.. -I$ARM_INC -fPIC -DANDROID"
export ARM_LDFLAGS="-nostdlib -L$ARM_LIB -L$ARM_LIB2 -lc -lm -ldl -lz -lstdc++ -lgcc"

export CFLAGS=$ARM_CFLAGS
export LDFLAGS=$ARM_LDFLAGS
export PKG_CONFIG_PATH=$UPNP_DIR

./configure --cross-compile --disable-nls --enable-dlna \
	--with-libdlna-dir=$DLNA_DIR --with-libupnp-dir=$UPNP_DIR \
	--prefix=USHARE_DIR --cross-prefix=$PREBUILT/bin/arm-linux-androideabi-
